package com.lbd.bonus.controller;

import com.lbd.base.controller.BaseController;
import com.lbd.commons.Result;
import com.lbd.commons.ResultState;
import com.lbd.bonus.bean.SysUserBonus;
import com.lbd.bonus.service.UserBonusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Yuanbo on 2016/9/22.
 * 用户奖励发放详情
 */
@RestController
@RequestMapping("/userBonus")
public class UserBonusController extends BaseController {

    @Autowired
    UserBonusService userBonusService;

    /**
     * 查看用户奖励发放详情
     *
     * @param page         当前页码
     * @param rows         每页显示条数
     * @param sysUserBonus 用户奖励实体
     * @return 查询结果json
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public Result list(int page, int rows, SysUserBonus sysUserBonus) {
        return new Result(ResultState.SUCCESS, "查询成功", userBonusService.findByPageConditionJpql(page, rows, sysUserBonus));
    }


}
